﻿using System;
using System.Collections.Generic;

using SBPweb.Modules.Modularity;

using SBPweb.MediaCenter.Common.Files;
using SBPweb.MediaCenter.Common.Modularity;

namespace SBPweb.MediaCenter.Modules.Viewer
{

    public abstract class ViewerServiceBase : ServiceBase, IViewerService
    {

        #region Constants

        private static readonly List<string> supportedExtensions = new List<string>(new string[] {
            "bmp",
            "gif",
            "jpg",
            "jpeg",
            "png"
        });

        #region Private fields

        private string currentExtensionsFilter;

        #endregion

        #endregion

        #region Constructor logic

        public ViewerServiceBase(IModule parentModule)
            : base(parentModule, "ViewerService")
        {
        }

        #endregion

        #region Property accessors

        public virtual string CurrentExtensionsFilter
        {
            get
            {
                return currentExtensionsFilter;
            }
            protected set
            {
                currentExtensionsFilter = value;
            }
        }

        #endregion

        #region Methods

        public virtual IList<string> GetSupportedExtensions()
        {
            return supportedExtensions;
        }

        public abstract void Open(Uri uri);

        #endregion

    }

}